/*
 * Thread.h
 *
 *  Created on: Oct 26, 2012
 *      Author: lucas
 */

#ifndef THREAD_H_
#define THREAD_H_

#include <pthread.h>

class Thread {
private:
	pthread_t t;
	bool isRunning;
	static void* rutina(void* arg);
	void run();
	Thread(const Thread& thread);
	Thread& operator=(const Thread& thread);
public:
	void iniciar();
	void join();
	virtual void parar();
	virtual void ejecutar() = 0;
	bool running();
	Thread();
	virtual ~Thread();
};

#endif /* THREAD_H_ */
